package com.asm.util;

import org.apache.poi.ss.formula.functions.T;

import java.util.List;

public class PageInfoCustom<T> {
    private int total;
    private int pageNum;
    private int pageSize;
    private T list;


    public static <T> PageInfoCustom<T> success(T list,int total,int pageNum,int pageSize) {
        PageInfoCustom<T> response = new PageInfoCustom<>();
        response.setList(list);
        response.setTotal(total);
        response.setPageNum(pageNum);
        response.setPageSize(pageSize);
        return response;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public T getList() {
        return list;
    }

    public void setList(T list) {
        this.list = list;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }
}
